
Imports WorkSync.BO

Module mdMain

    Public Destination As Params.Destination

    Sub Main(ByVal args() As String)

        Console.WriteLine("")

        Try

            Params.LoadConfiguration(args)

            Select Case Destination

                Case Params.Destination.PC

                Case Params.Destination.USBorPortableDevice

                    Dim iPod As New BO.BackUpToDevice()
                    iPod.DriveLetter = "G:\"

                    iPod.Databases = Params.LoadDatabaseProjects
                    iPod.Projects = Params.LoadOtherProjects

                    iPod.Start()

            End Select

        Catch ex As Exception

            Console.WriteLine(ex.ToString)

        End Try

    End Sub

    Private Sub ArgsTest(ByVal args() As String)

        Dim i As Integer

        For i = 0 To args.GetUpperBound(0)
            Console.WriteLine(args(i))
        Next

    End Sub

End Module

